package com.ruoyi.task.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.task.domain.TaskWithdraw;
import com.ruoyi.task.mapper.TaskWithdrawMapper;
import com.ruoyi.task.service.ITaskWithdrawService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 提现管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-17
 */
@Service
public class TaskWithdrawServiceImpl implements ITaskWithdrawService
{
    @Autowired
    private TaskWithdrawMapper taskWithdrawMapper;

    /**
     * 查询提现管理
     * 
     * @param id 提现管理主键
     * @return 提现管理
     */
    @Override
    public TaskWithdraw selectTaskWithdrawById(Long id)
    {
        return taskWithdrawMapper.selectTaskWithdrawById(id);
    }

    /**
     * 查询提现管理列表
     * 
     * @param taskWithdraw 提现管理
     * @return 提现管理
     */
    @Override
    public List<TaskWithdraw> selectTaskWithdrawList(TaskWithdraw taskWithdraw)
    {
        return taskWithdrawMapper.selectTaskWithdrawList(taskWithdraw);
    }

    /**
     * 新增提现管理
     * 
     * @param taskWithdraw 提现管理
     * @return 结果
     */
    @Override
    public int insertTaskWithdraw(TaskWithdraw taskWithdraw)
    {
        taskWithdraw.setCreateTime(DateUtils.getNowDate());
        return taskWithdrawMapper.insertTaskWithdraw(taskWithdraw);
    }

    /**
     * 修改提现管理
     * 
     * @param taskWithdraw 提现管理
     * @return 结果
     */
    @Override
    public int updateTaskWithdraw(TaskWithdraw taskWithdraw)
    {
        return taskWithdrawMapper.updateTaskWithdraw(taskWithdraw);
    }

    /**
     * 批量删除提现管理
     * 
     * @param ids 需要删除的提现管理主键
     * @return 结果
     */
    @Override
    public int deleteTaskWithdrawByIds(Long[] ids)
    {
        return taskWithdrawMapper.deleteTaskWithdrawByIds(ids);
    }

    /**
     * 删除提现管理信息
     * 
     * @param id 提现管理主键
     * @return 结果
     */
    @Override
    public int deleteTaskWithdrawById(Long id)
    {
        return taskWithdrawMapper.deleteTaskWithdrawById(id);
    }
}
